<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        .box{
            height: 489px;
            background-color: #f00;
        }
        .box img{
            /* 相对定位 */
            position: relative;
            /* top,left,right,bottom可以设置负值 */
            left:-960px;

            /* 这里的50%是相对于box的50% */
            margin-left: 50%;
        }
    </style>
</head>
<body>
    <div class="box">
        <img src="./images/mhxy.jpg" alt="">
    </div>
</body>
</html>


<!-- <!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>
        *{
            margin: 0;
            padding: 0;
        }
        .box{
            height: 489px;
            background-color: #f00;
        }
    </style>
</head>
<body>
    <div class="box">
        <img src="./images/mhxy.jpg" alt="">
    </div>
</body>
</html> -->